javascript replace multiple spaces with single space

412

replace multiple spaces with single space javascript -

string = string.replace(/\s\s+/g, ' ');

Comments

Submit
0 Comments